﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x020000C9 RID: 201
	internal class InvalidString : IStringDecoder
	{
		// Token: 0x06000302 RID: 770 RVA: 0x0000BE09 File Offset: 0x0000A209
		private InvalidString()
		{
		}

		// Token: 0x06000303 RID: 771 RVA: 0x0000BE11 File Offset: 0x0000A211
		public string Read(byte[] bytes, int offset, out int readSize)
		{
			throw new InvalidOperationException(string.Format("code is invalid. code:{0} format:{1}", bytes[offset], MessagePackCode.ToFormatName(bytes[offset])));
		}

		// Token: 0x040000E6 RID: 230
		internal static readonly IStringDecoder Instance = new InvalidString();
	}
}
